1. Field of the Invention
The present invention relates to a measuring endoscope apparatus that performs measurement based on the principle of triangulation using image data, and a program for controlling the operation.
Priority is claimed on Japanese Patent Application No. 2007-338002 filed on Dec. 27, 2007, and Japanese Patent Application No. 2008-281474 filed on Oct. 31, 2008, the contents of which are incorporated herein by reference.
2. Description of Related Art
Industrial endoscopes are used to observe or check inside damage or corrosion of boilers, turbines, engines, chemical plants, water pipes, and the like. Industrial endoscopes have a plurality of kinds of optical adapters to observe and check various objects, and tip portions of the industrial endoscopes can be replaced.
An example of such an optical adapter includes a stereo optical adapter which forms two left and right fields of view in an observation optical system. Japanese unexamined Patent Application, First Publication No. 2006-15117 discloses a measuring endoscope apparatus that uses a stereo optical adapter, calculates the three-dimensional spatial coordinates of a subject on the basis of the coordinates of left and right optical system distance measurement points when a subject image is captured by left and right optical systems using the principle of triangulation, and measures a distance between two points on the subject. In addition, Japanese unexamined Patent Application, First Publication No. 2006-325741 discloses a measuring endoscope apparatus that calculates the three-dimensional spatial coordinates of a subject at high speed by similarly using the principle of triangulation, and measures a distance (object distance) to the subject in real time.
FIGS. 24 and 25 show screens (hereinafter, referred to as “display screens”) displayed by a display device of a measuring endoscope apparatus. FIG. 24 shows a display screen in measuring a distance between two points, and FIG. 25 shows a display screen in measuring an object distance. A left image 2410 and a right image 2420 corresponding to left and right subject images captured by an optical adapter are displayed on a display screen 2400 shown in FIG. 24. Similarly, a left image 2510 and a right image 2520 are displayed on a display screen 2500 shown in FIG. 25.
As shown in FIG. 24, when a user designates measurement points 2440a and 2440b on a subject 2430 of the left image 2410, matching processing for calculating the positions of corresponding points 2450a and 2450b on the right image 2420, which correspond to the measurement points 2440a and 2440b, by image pattern matching is performed. Then, three-dimensional coordinates of a first point on the subject corresponding to the measurement point 2440a are calculated from two-dimensional coordinates of the measurement point 2440a and its corresponding point 2450a and optical data. Similarly, three-dimensional coordinates of a second point on the subject corresponding to the measurement point 2440b are calculated from two-dimensional coordinates of the measurement point 2440b and its corresponding point 2450b and optical data. A distance between the two points is calculated from the three-dimensional coordinates of the first and second points and is displayed as a measurement result 2460.
In addition, as shown in FIG. 25, when the user designates a measurement point 2540 on a subject 2530 of the left image 2510, the position of a corresponding point 2550 on the right image 2520, which corresponds to the measurement point 2540, is calculated by matching processing. Then, three-dimensional coordinates of a point on the subject corresponding to the measurement point 2540 are calculated from two-dimensional coordinates of the measurement point 2540 and its corresponding point 2550 and optical data. An object distance is calculated from the three-dimensional coordinates of the point and is displayed as a measurement result 2560.
However, when the brightness of an image is not appropriate as in a case where an image used for measurement is too bright or too dark, when there is no characteristic pattern on an image, or when it is difficult to secure the measurement accuracy because a distance to a subject is too far, the matching processing often fails. For example, the matching processing on the measurement point 2440b failed in FIG. 24, and the matching processing on the measurement point 2540 failed in FIG. 25. As a result, erroneous measurement results were displayed.
The measurement may be performed again as long as it can be immediately checked that there is an error in the measurement results. However, if the user does not recognize that the measurement result is erroneous at a point of time when the measurement has been performed, and recognizes later that the measurement result is erroneous since the user did not check whether or not the point on the right image corresponding to the measurement point designated on the left image was correctly calculated by the matching processing, the measurement should be done again from the beginning, for example. As a result, working efficiency is lowered.